/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Business;

import Entity.Etbl_Foods;
import Model.DALtbl_Foods;
import java.util.ArrayList;

/**
 *
 * @author LeThuyLinh
 */
public class Btbl_Foods {
    private DALtbl_Foods _objDAL_Food=null;
    public Btbl_Foods(){
        _objDAL_Food=new DALtbl_Foods();
    }
    public boolean Addtbl_Food(Etbl_Foods objEtbl_Food){
        return _objDAL_Food.Addtbl_Food(objEtbl_Food);
    }
    public boolean Updatetbl_Food(Etbl_Foods objEtbl_Food){
        return _objDAL_Food.updatetbl_Food(objEtbl_Food);
    }
    public boolean Deletetbl_Food(int foodID){
        if(foodID>0){
        return _objDAL_Food.deletetbl_Food(foodID);
        }
        else{
            return false;
        }
    }
    public Etbl_Foods GetOnetbl_Food(int fooID){
        if(fooID>0)
            return _objDAL_Food.getFood(fooID);
        else
            return null;
    }
    public ArrayList GetListFoods(String orderBy, String ASCorDESC, String WhereClause, int PagingIndex, int PagingSize){
        return _objDAL_Food.getListFood(orderBy, ASCorDESC, WhereClause, PagingIndex, PagingSize);
    }
}
